import request from '@/utils/request'
// 查询商城分类列表
export function firstGrade(query) {
  return request({
    url: '/shopping/classify/firstGrade',
    method: 'get',
    params: query
  })
}
export function secondGrade(query) {
  return request({
    url: '/shopping/classify/secondGrade',
    method: 'get',
    params: query
  })
}

//商城商品页面里分类所获取的值
export function liststate(query) {
  return request({
    url: '/shopping/classify/treequery',
    method: 'get',
    params: query
  })
}

// 查询商城分类列表
export function listClassify(query) {
  return request({
    url: '/shopping/classify/list',
    method: 'get',
    params: query
  })
}

// 查询商城分类详细
export function getClassify(id) {
  return request({
    url: '/shopping/classify/' + id,
    method: 'get'
  })
}

// 新增商城分类
export function addClassify(data) {
  return request({
    url: '/shopping/classify',
    method: 'post',
    data: data
  })
}

// 修改商城分类
export function updateClassify(data) {
  return request({
    url: '/shopping/classify',
    method: 'put',
    data: data
  })
}

// 删除商城分类
export function delClassify(id) {
  return request({
    url: '/shopping/classify/' + id,
    method: 'delete'
  })
}
// 删除商城分类
export function logicDelClassify(id) {
  return request({
    url: '/shopping/classify/' + id,
    method: 'delete'
  })
}

// 导出商城分类
export function exportClassify(query) {
  return request({
    url: '/shopping/classify/export',
    method: 'get',
    params: query
  })
}
